package com.study.spring.intercept.config;

import com.study.spring.intercept.UserInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author
 * @date 2022年05月08日 11:18
 * @description
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {



        registry.addInterceptor(new UserInterceptor()).addPathPatterns().excludePathPatterns();
    }
}
